package com.ddx.dao;

import com.ddx.dto.ShoppingOrderVo;
import com.ddx.pojo.FullOrder;
import com.ddx.pojo.OrderProductSaleInfo;
import com.ddx.pojo.ShoppingOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Repository
public interface ShoppingOrderMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(ShoppingOrder record);

    int insertSelective(ShoppingOrder record);

    ShoppingOrder selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ShoppingOrder record);

    int updateByPrimaryKey(ShoppingOrder record);

    /**
     * 根据用户查询订单
     * @param shoppingOrderVo
     * @return
     */
    List<ShoppingOrder> selectOrderByUserId(ShoppingOrderVo shoppingOrderVo);

    ShoppingOrder selectOrderByOrderId(String orderId);

    int updateByOrderId(ShoppingOrder record);

    List<OrderProductSaleInfo> selectProductSaleAmount(@Param("productIdList") List<Integer> productIdList);

    int countWithSupplier(@Param("shopId") Integer shopId, @Param("status") int status);

    List<FullOrder> selectListWithSupplier(@Param("shopId") Integer shopId, @Param("status") int status, @Param("index") int index, @Param("size") int size);

    int send(@Param("orderId") String orderId, @Param("companyName") String companyName, @Param("expressNo") String expressNo);
}